<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
</head>
<body>
	<c:url value="/" var="baseUrl" />
	
	
	<form action="${baseUrl}man/ListUser" method="post">
		<table align="center">
			<tr>
				<td>账号:</td>
				<td><input type="text" name="account" value="${account}" /> <input
					type="hidden" name="pageNo" value="${paging.pageNo}" /> <input
					type="hidden" name="pageSize" value="${paging.pageSize}" /></td>
				<td><input type="submit" value="搜索" name="find" /></td>
			</tr>
		</table>
		<table align="center">
			<caption>用户列表</caption>
			<tr>
				<th>账号</th>
				<th>密码</th>
				<th>地市</th>
				
				<td><a href="AddUser">添加</a></td>
			</tr>
			<c:forEach items="${paging.datas}" var="user" varStatus="status">
				<tr>
					<td>${user.account}</td>
					<td>${user.passwd}</td>
					<td>${user.city}</td>
					<td>
					<a href="ChgUser?id=${user.id}">修改</a>
					<a href="DelUser?id=${user.id}"
					onClick="return confirm('确实要删除账号 ${user.account}');"
					>删除</a>
					</td>
					
					
				</tr>
			</c:forEach>
		</table>

		<table align="center">
			<tr>
				<c:if test="${paging.pageCount>1}">
					<td><input type="submit" value="首页" name="firstPage" /></td>
				</c:if>
				<c:if test="${paging.pageNo>0 && paging.pageNo<=paging.pageCount-1}">
					<td><input type="submit" value="前页" name="previousPage" /></td>
				</c:if>
				<td>第${paging.pageNo+1}页 / 共${paging.pageCount}页</td>
				<c:if test="${paging.pageNo>=0 && paging.pageNo<paging.pageCount-1}">
					<td><input type="submit" value="后页" name="nextPage" /></td>
				</c:if>
				<c:if test="${paging.pageCount>1}">
					<td><input type="submit" value="尾页" name="lastPage" /></td>
				</c:if>
			</tr>
		</table>

	</form>
</body>
</html>